﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>

<!--[if lte IE 8]>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
<![endif]-->

<noscript>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/content/activitie_noscript.css")" rel="stylesheet" type="text/css"/>
</noscript>

@model PessModel.Activity

@{
    ViewBag.Title = "Call for Papers Event";
}

@*@Html.Partial("_ActivityNavPartial",Model.ID)*@

<h2>Event Information</h2>

<div id="operate">
    @if (Roles.IsUserInRole(Membership.GetUser().UserName, "Admin") )
    {
        @Html.ActionLink("Edit Event", "Edit", new { id = Model.ID })<span>&#8195;</span>
        @Html.ActionLink("Review Progress","Progress",new { activityID = Model.ID })
    }
    &#8195;@Html.ActionLink("Back", "Index")
</div>
<fieldset>
    <div class="displayHead">
        @Html.DisplayFor(model => model.Name)
    </div>
    <div class="displayDesc_long">
        @*@Html.DisplayFor(model => model.Description)*@
        @if(!Roles.IsUserInRole("Chair"))
        {
            @Html.Raw(Model.Description)
        }
    </div>
    
    @if (Roles.IsUserInRole("Admin") || Roles.IsUserInRole("Chair") ||
                                                  Roles.IsUserInRole(Membership.GetUser().UserName, "Editor"))
    {    
    <div class="displayYear">
        Year：@Html.DisplayFor(model => model.AdminYear)
    </div>
    <div class="displayYear">
        @{
            var status=(PessModel.ActivityStatus)Model.Status;
            var statusLocalName=status.ToLocalName();
        }
        Event Status：@Html.DisplayFor(model =>statusLocalName)
    </div>
    <div class="displaySTime">
        Event Start Date：@Html.DisplayFor(model => model.StartDate)
    </div>
    <div class="displayDTime">
        Event End Date：@Html.DisplayFor(model => model.DueDate)
    </div>
    }
    @if (Roles.IsUserInRole("Admin") || Roles.IsUserInRole("Chair") || Roles.IsUserInRole("Chair") ||
                                                  Roles.IsUserInRole(Membership.GetUser().UserName, "Editor"))
    {
    <div class="displaySTime">
        Proposal Submission Start：@Html.DisplayFor(model => model.UploadStartDate)
    </div>
    <div class="displayDTime">
        Proposal Submission Due：@Html.DisplayFor(model => model.UploadDueDate)
    </div>
        
        <div class="displaySTime">
        Review Start：@Html.DisplayFor(model => model.ReviewStartDate)
    </div>
    <div class="displayDTime">
        Review Due：@Html.DisplayFor(model => model.ReviewDueDate)
    </div>
       
      <div class="displaySTime">
        Upload Paper Start：@Html.DisplayFor(model => model.PaperStartDate)
    </div>
    <div class="displayDTime">
        Upload Paper Due：@Html.DisplayFor(model => model.PaperDueDate)
    </div>
        
       <div class="displaySTime">
        Paper Review Start：@Html.DisplayFor(model => model.PaperReviewStartDate)
    </div>
    <div class="displayDTime">
        Paper Review Due：@Html.DisplayFor(model => model.PaperReviewDueDate)
    </div>
        
        <div class="displaySTime">
        Final Paper Start：@Html.DisplayFor(model => model.FinalPaperStartDate)
    </div>
    <div class="displayDTime">
        Final Paper Due：@Html.DisplayFor(model => model.FinalPaperDueDate)
    </div>
    }
    @if(Roles.IsUserInRole("Admin"))
    {
     <div class="displayDTime">
        Event Type：@Html.DisplayFor(model => model.PessType.Name)
    </div>
    }
        
    @if (Roles.IsUserInRole("Admin") || Roles.IsUserInRole("Chair") ||
                                                  Roles.IsUserInRole(Membership.GetUser().UserName, "Editor"))
    {
    <div class="displayCoordinate">
        <p>Submission Information</p>
        @Html.PivotTable((System.Data.DataTable)ViewData["StatusTable"], "CountyName", "Title", new string[] { "Uploaded" })
        @*Note: The numbers in above table include proposals with submitted, reviewing, accepted, and rejected status.*@
    </div>
    }
</fieldset>
